import { h } from 'vue'
import { createRouter, createWebHashHistory } from 'vue-router'
import main from "@/stores/main"
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "home",
      component: () => import("@/pages/home.vue"),
    },
    {
      path:"/:catchAll(.*)",
      component:h('h1',{style:{margin:"10px"}},{default:()=>"Not Found！"})
  },
  ]
})

router.beforeEach((to,from)=>{
  const $store = main()
})

export default router
